import NftEggsNFT from "../contracts/NftEggsNFT.cdc"

// 获取指定钱包地址拥有的NFT数量
pub fun main(account: Address): Int {
    let collectionRef = getAccount(account)
        .getCapability(/public/NFTCollection)
        .borrow<&{NftEggsNFT.NftEggsNFTCollectionPublic}>()
        ?? panic("Could not borrow capability from public collection")

    return collectionRef.getIDs().length
}
